/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package domein;

import java.util.List;
import persistentie.PersistentieController;

/**
 *
 * @author vuokko
 */
public class DomeinController {
    
    private static DomeinController instance;
    private List<Serie> seriesList;
    
    private DomeinController() {
        seriesList = PersistentieController.getInstance().getAllSeries();
    }
    
    public static DomeinController getInstance() {
        if (instance == null) { instance = new DomeinController(); }
        return instance;
    }
    
    public List<Serie> getSeries() {
        return seriesList;
    }

    public void addSerie(Serie se) {
        seriesList.add(se);
        //TODO notify listeners
    }
}
